package org.petstore.service;

import org.petstore.util.Cart;
import org.petstore.util.CartItem;

public interface CartService {
    /**
     * description 获取购物车
     *
     * @param username:
     * @return Cart
     * @author huangzhangyan
     * @date 2022/1/10 15:25
     */
    Cart getCartByName(String username);

    /**
     * description 添加一个CartItem进购物车
     *
     * @param username:
     * @param cartItem:
     * @author huangzhangyan
     * @date 2022/1/10 15:25
     */
    void addIntoCart(String username, CartItem cartItem);

    /**
     * description 删除一个在购物车
     * `@param username:
     *
     * @param itemId: `
     * @author huangzhangyan
     * @date 2022/1/10 15:25
     */
    void deleteInCart(String username, String itemId);
}
